<!DOCTYPE html>
<html>
<head>
  <meta charset="utf-8">
  <title>散文网</title>
  <!--<link rel="stylesheet" href="http://cdn.static.runoob.com/libs/bootstrap/3.3.7/css/bootstrap.min.css">-->
  <link rel="stylesheet" href="/css/bootstrap.css">
  <link rel="stylesheet" href="/css/main.css">
</head>
<body>

<nav class="navbar navbar-inverse" role="navigation">
  <div class="container">
    <div class="navbar-header">
      <button type="button" class="navbar-toggle" data-toggle="collapse"
              data-target="#example-navbar-collapse">
        <span class="sr-only">散文网</span>
        <span class="icon-bar"></span>
        <span class="icon-bar"></span>
        <span class="icon-bar"></span>
      </button>
      <a class="navbar-brand" href="#">散文网</a>
    </div>
    <div class="collapse navbar-collapse" id="example-navbar-collapse">
      <ul class="nav navbar-nav">
        <% if(cat_id==0){%>
          <li class="active"><a href="/">首页</a></li>
        <%}else{%>
        <li><a href="/">首页</a></li>
        <%}%>
        <% navData.forEach(function(item){
          if(parseInt(cat_id)==item.id){
              var cls='class=active';
          }else{
              var cls='';
          }
        %>
          <li <%=cls%>><a href="/article/lst/<%=item.id%>/1"><%=item.name%></a></li>
        <%})%>

      </ul>
    </div>
  </div>
</nav>
